package indi.chengx.walty.ui.lisener;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import org.freedesktop.gstreamer.Bin;
import org.freedesktop.gstreamer.Element;
import org.freedesktop.gstreamer.GstObject;
import org.freedesktop.gstreamer.Pipeline;
import org.freedesktop.gstreamer.elements.AppSink;
import org.freedesktop.gstreamer.lowlevel.GValueAPI.GValue;
import org.freedesktop.gstreamer.lowlevel.GValueAPI.GValue.GValueData;
import org.freedesktop.gstreamer.lowlevel.GstBinAPI;
import org.freedesktop.gstreamer.lowlevel.GstElementAPI;
import org.freedesktop.gstreamer.lowlevel.GstElementFactoryAPI;
import org.freedesktop.gstreamer.lowlevel.GstObjectAPI;
import org.freedesktop.gstreamer.lowlevel.GstObjectAPI.GstObjectStruct;
import org.freedesktop.gstreamer.lowlevel.GstValueAPI;

import indi.chengx.walty.Config;
import indi.chengx.walty.dirve.Camera;
import indi.chengx.walty.dirve.CameraListener;
import indi.chengx.walty.ui.SimpleVideoComponent;
import indi.chengx.walty.util.Console;

public class TakePicture implements MouseListener{
	private final String TAG = getClass().getSimpleName();
	private CameraListener lis;
	
	public TakePicture(CameraListener lis) {
		this.lis = lis;
	}
	
	public void mouseClicked(MouseEvent e) {
		// TODO Auto-generated method stub
		//pipe.getFactory().create("multifilesink  name=filesink post-messages=true location="+Config.IMAGE_SAVE_PATH+" t.");
		lis.takePicture();
		Console.log(TAG,"mouseClicked");
	}

	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}
	
}
